package com.cssl.repository;

import com.cssl.domain.DtsRole;
import feign.Param;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Component;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;


import java.util.Optional;
@Repository
public interface RoleRepository extends JpaRepository<DtsRole, Integer> {

    @Query(value = "SELECT * FROM dts_role WHERE id = :id", nativeQuery = true)
    Optional<DtsRole> findRoleById(@Param("id") Integer id);
}